GeMA
The GeMA main application
Loading...
Searching...
No Matches
Result attributes and Progress items

TODO: description of result attributes and progress items

Index:

Result attribute functions

evalResults(ruleId)
Description: XXX.
Parameters: ruleId - XXX.
Returns: Nothing.

Example:

XXX


registerResultAttribute(attrName, description, unit, nlin, ncol, format)
Description: XXX.
Parameters: attrName XXX.
description XXX.
unit XXX.
nlin XXX.
ncol XXX.
format XXX.
Returns: Returns XXX.

Example:

XXX


resultAttributeId(attrName)
Description: XXX.
Parameters: attrName - XXX.
Returns: XXX.

Example:

XXX


setResultAttribute(attrId, value)
Description: XXX.
Parameters: attrId XXX.
value XXX.
Returns: Returns nothing.

Example:

XXX


resultAttribute(attrId)
Description: XXX.
Parameters: attrId - XXX.
Returns: XXX.

Example:

XXX


Progress item functions

registerProgressItem(itemName, trackMem)
Description: Registers a new result progress statistics item. Gets as parameters the item name. It will be registered as a child of the lua "process item". Returns the new item id. After the end of the simulation, the time taken between calls to the progressItemStart() and progressItemEnd() funtions will be reported at the global time statistics report.
Parameters: itemName The desired item name. Since the new item will be a child of the "lua" item, its full name includes a lua. prefix. If there is already a Lua item with that name, the full name will receive a suffix to make it unique.
trackMem An optional flag parameter. If set to true, the new item will also track the used memory when the item's progress level is set to detailed (see the "Controlling the set of collected time, memory and additional attribute statistics" section from the Configuratio options documentation).
Returns: Returns the new item id or nil if the item could not be registered.

Example:

local item = registerProgressItem('myItem') -- Registered item name will be equal to 'lua.myItem'


progressItemId(itemName)
Description: Returns the id of the named item. Can be used to query either items created by calls to registerProgressItem() or global existing items.
Parameters: itemName - The full item name. For Lua items, should include the lua. prefix.
Returns: Returns the item id or nil if there is no item with the given name.

Example:

local id = progressItemId('lua.myItem')


progressItemStart(itemId)
Description: Starts the time monitoring for the given item.
Parameters: itemId - The item id, obtained by a call to registerProgressItem() or progressItemId().
Returns: Returns nothing.

Example:

local myTimedLuaProcessItem
function myTimedLuaProcess()
if not myTimedLuaProcessItem then
myTimedLuaProcessItem = registerProgressItem('myTimedProcess')
end
progressItemStart(myTimedLuaProcessItem)
-- Do time consuming processing
progressItemEnd(myTimedLuaProcessItem)
end


progressItemEnd(itemId)
Description: Ends the time monitoring for the given item.
Parameters: itemId - The item id, obtained by a call to registerProgressItem() or progressItemId().
Returns: Returns nothing.

Example:

local myTimedLuaProcessItem
function myTimedLuaProcess()
if not myTimedLuaProcessItem then
myTimedLuaProcessItem = registerProgressItem('myTimedProcess')
end
progressItemStart(myTimedLuaProcessItem)
-- Do time consuming processing
progressItemEnd(myTimedLuaProcessItem)
end